package cn.ryh.jdbctemplate.controller;

import cn.ryh.jdbctemplate.entity.User;
import cn.ryh.jdbctemplate.service.JdbcTemplateService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName JdbcTemplateController
 * @Description TODO
 * @Author RaoYH
 */
@RestController
@RequestMapping(value = "/jdbcTemplateController")
public class JdbcTemplateController {
    @Resource
    private JdbcTemplateService jdbcTemplateService;

    /**
     * 查询用户
     * @param id
     * @return
     */
    @RequestMapping(value = "/getUser")
    public User getUser() {
        return jdbcTemplateService.getUser(22);
    }

}
